<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-169911533-1"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-169911533-1');
</script>

  

  
  <title>.NET Framework 连接 Oracle数据库：找不到请求的 .Net Framework Data Provider。可能没有安装 | 空城盼故人</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="google-site-verification" content="NOVpqBhVVjZHOamocUf3Grijt7xAK_Engoe_FNrxE3Q" />
  <meta name="baidu-site-verification" content="HBrapLOndy" />
  
  <meta name="keywords" content="许嵩老公" />
  
  <meta name="description" content="1. 错误信息 1.1. 错误详情   2. 问题原因 3. 查看与设置ORACLE_HOME环境变量 3.1. Windows下查看与设置环境变量   4. 下载与安装ODP.NET驱动 5. Oracle数据库连接配置 5.1. 分析与解决错误 5.1.1. 先了解下 oracle tnsnames.ora 文件用法 5.1.1.1. 1.用途 5.1.1.2. 2.用法     5.2.">
<meta property="og:type" content="article">
<meta property="og:title" content=".NET Framework 连接 Oracle数据库：找不到请求的 .Net Framework Data Provider。可能没有安装">
<meta property="og:url" content="https://xiaoyan94.github.io/2022/08/29/NET-Framework-%E8%BF%9E%E6%8E%A5-Oracle%E6%95%B0%E6%8D%AE%E5%BA%93/index.html">
<meta property="og:site_name" content="空城盼故人">
<meta property="og:description" content="1. 错误信息 1.1. 错误详情   2. 问题原因 3. 查看与设置ORACLE_HOME环境变量 3.1. Windows下查看与设置环境变量   4. 下载与安装ODP.NET驱动 5. Oracle数据库连接配置 5.1. 分析与解决错误 5.1.1. 先了解下 oracle tnsnames.ora 文件用法 5.1.1.1. 1.用途 5.1.1.2. 2.用法     5.2.">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://xiaoyan94.github.io/2022/08/29/NET-Framework-%E8%BF%9E%E6%8E%A5-Oracle%E6%95%B0%E6%8D%AE%E5%BA%93/2022-08-30-08-53-43.png">
<meta property="og:image" content="https://xiaoyan94.github.io/2022/08/29/NET-Framework-%E8%BF%9E%E6%8E%A5-Oracle%E6%95%B0%E6%8D%AE%E5%BA%93/2022-08-30-10-58-26.png">
<meta property="og:image" content="https://s1.ax1x.com/2022/08/30/vhE8HI.png">
<meta property="og:image" content="https://xiaoyan94.github.io/2022/08/29/NET-Framework-%E8%BF%9E%E6%8E%A5-Oracle%E6%95%B0%E6%8D%AE%E5%BA%93/2022-08-30-08-52-27.png">
<meta property="og:image" content="https://s1.ax1x.com/2022/08/30/vhEt4f.png">
<meta property="article:published_time" content="2022-08-29T08:13:41.000Z">
<meta property="article:modified_time" content="2022-09-05T14:44:00.663Z">
<meta property="article:author" content="许嵩老公">
<meta property="article:tag" content="许嵩老公">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://xiaoyan94.github.io/2022/08/29/NET-Framework-%E8%BF%9E%E6%8E%A5-Oracle%E6%95%B0%E6%8D%AE%E5%BA%93/2022-08-30-08-53-43.png">
  
    <link rel="alternate" href="../../../../atom.xml" title="空城盼故人" type="application/atom+xml">
  
  
    <link rel="icon" href="https://q1.qlogo.cn/g?b=qq&nk=979727728&s=640">
  
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  
<link rel="stylesheet" href="../../../../css/style.css">

  
<link rel="stylesheet" href="../../../../css/highlight.css">

<meta name="generator" content="Hexo 4.2.1"></head>

<body>
  <div id="fullpage" class="mobile-nav-right">
    <div class="fixed"></div>
    
      <div id="wrapper">
    
    
      <header id="header">
  <div id="nav-toggle" class="nav-toggle"></div>
  <div class="head-box global-width">
    <nav class="nav-box nav-right">
      
        <a class="nav-item" href="../../../../index.html" title
        
        >首页</a>
      
        <a class="nav-item" href="../../../../archives" title
        
        >归档</a>
      
        <a class="nav-item" href="../../../../quick-notes" title
        
        >小抄</a>
      
        <a class="nav-item" href="../../../../about" title
        
        >关于</a>
      
    </nav>
  </div>
</header>
      <div id="middlecontent" title class="global-width sidebar-right">
        <section id="main"><article id="post-NET-Framework-连接-Oracle数据库" class="article global-container article-type-post" itemscope itemprop="blogPost">
  
    <header class="article-header">
      
  
    <h1 class="article-title" itemprop="name">
      .NET Framework 连接 Oracle数据库：找不到请求的 .Net Framework Data Provider。可能没有安装
    </h1>
  

    </header>
  
  <div class="article-meta">
    <a href="" class="article-date">
  <time datetime="2022-08-29T08:13:41.000Z" itemprop="datePublished">2022-08-29</time>
</a>
    
    
  </div>
  
    <span id="busuanzi_container_page_pv">
      本文总阅读量<span id="busuanzi_value_page_pv"></span>次
    </span>
  

  <div class="article-inner">
    
    <div class="article-content article-content-cloud" itemprop="articleBody">
      
        
        <ul>
<li><a href="#1-%E9%94%99%E8%AF%AF%E4%BF%A1%E6%81%AF">1. 错误信息</a><ul>
<li><a href="#11-%E9%94%99%E8%AF%AF%E8%AF%A6%E6%83%85">1.1. 错误详情</a></li>
</ul>
</li>
<li><a href="#2-%E9%97%AE%E9%A2%98%E5%8E%9F%E5%9B%A0">2. 问题原因</a></li>
<li><a href="#3-%E6%9F%A5%E7%9C%8B%E4%B8%8E%E8%AE%BE%E7%BD%AEoracle_home%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F">3. 查看与设置ORACLE_HOME环境变量</a><ul>
<li><a href="#31-windows%E4%B8%8B%E6%9F%A5%E7%9C%8B%E4%B8%8E%E8%AE%BE%E7%BD%AE%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F">3.1. Windows下查看与设置环境变量</a></li>
</ul>
</li>
<li><a href="#4-%E4%B8%8B%E8%BD%BD%E4%B8%8E%E5%AE%89%E8%A3%85odpnet%E9%A9%B1%E5%8A%A8">4. 下载与安装ODP.NET驱动</a></li>
<li><a href="#5-oracle%E6%95%B0%E6%8D%AE%E5%BA%93%E8%BF%9E%E6%8E%A5%E9%85%8D%E7%BD%AE">5. Oracle数据库连接配置</a><ul>
<li><a href="#51-%E5%88%86%E6%9E%90%E4%B8%8E%E8%A7%A3%E5%86%B3%E9%94%99%E8%AF%AF">5.1. 分析与解决错误</a><ul>
<li><a href="#511-%E5%85%88%E4%BA%86%E8%A7%A3%E4%B8%8B-oracle-tnsnamesora-%E6%96%87%E4%BB%B6%E7%94%A8%E6%B3%95">5.1.1. 先了解下 oracle <code>tnsnames.ora</code> 文件用法</a><ul>
<li><a href="#5111-1%E7%94%A8%E9%80%94">5.1.1.1. 1.用途</a></li>
<li><a href="#5112-2%E7%94%A8%E6%B3%95">5.1.1.2. 2.用法</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#52-%E8%A7%A3%E5%86%B3%E6%96%B9%E6%B3%95">5.2. 解决方法</a></li>
</ul>
</li>
</ul>
<h2 id="1-错误信息"><a href="#1-错误信息" class="headerlink" title="1. 错误信息"></a>1. 错误信息</h2><p>解决错误信息：<strong>找不到请求的 .Net Framework Data Provider。可能没有安装</strong></p>
<h3 id="1-1-错误详情"><a href="#1-1-错误详情" class="headerlink" title="1.1. 错误详情"></a>1.1. 错误详情</h3><p><img src="/2022/08/29/NET-Framework-%E8%BF%9E%E6%8E%A5-Oracle%E6%95%B0%E6%8D%AE%E5%BA%93/2022-08-30-08-53-43.png" alt="找不到请求的 .Net Framework Data Provider。可能没有安装。"></p>
<a id="more"></a>

<hr>
<p>“&#x2F;”应用程序中的服务器错误</p>
<p><em>找不到请求的 .Net Framework Data Provider。可能没有安装。</em></p>
<p><strong>说明:</strong> 执行当前 Web 请求期间，出现未经处理的异常。请检查堆栈跟踪信息，以了解有关该错误以及代码中导致错误的出处的详细信息。</p>
<p><strong>异常详细信息:</strong> System.ArgumentException: 找不到请求的 .Net Framework Data Provider。可能没有安装。</p>
<p><strong>源错误:</strong></p>
<div class="highlight-box"autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="false"data-rel="PLAIN"><figure class="iseeu highlight /plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">行 3216:</span><br><span class="line">行 3217:            var arr &#x3D; list.Select(s &#x3D;&gt; s.SoMainId).ToArray();</span><br><span class="line">行 3218:            var query &#x3D; _ncdataEntities.Database.SqlQuery&lt;SOMainCustomerInfo&gt;(string.Format( </span><br><span class="line">行 3219:                            @&quot;select a.csaleorderid AS SOMainId</span><br><span class="line">,a.vbillcode AS SOCode</span><br></pre></td></tr></table></figure></div>

<p><strong>源文件:</strong> <code>D:\\Portal-VS2013-NC\\Portal-VS2013-NC\\DataAccess\\Bom\\DASOBom.cs</code> <strong>行:</strong> 3218</p>
<p><strong>堆栈跟踪:</strong></p>
<div class="highlight-box"autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="false"data-rel="PLAIN"><figure class="iseeu highlight /plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br></pre></td><td class="code"><pre><span class="line">[ArgumentException: 找不到请求的 .Net Framework Data Provider。可能没有安装。]</span><br><span class="line">   System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName) +1025375</span><br><span class="line">   System.Data.EntityClient.EntityConnection.GetFactory(String providerString) +27</span><br><span class="line"></span><br><span class="line">[ArgumentException: 指定的存储区提供程序在配置中找不到，或者无效。]</span><br><span class="line">   System.Data.EntityClient.EntityConnection.GetFactory(String providerString) +90</span><br><span class="line">   System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString) +503</span><br><span class="line">   System.Data.EntityClient.EntityConnection..ctor(String connectionString) +47</span><br><span class="line">   System.Data.Entity.Internal.LazyInternalConnection.InitializeFromConnectionStringSetting(ConnectionStringSettings appConfigConnection) +78</span><br><span class="line">   System.Data.Entity.Internal.LazyInternalConnection.TryInitializeFromAppConfig(String name, AppConfig config) +32</span><br><span class="line">   System.Data.Entity.Internal.LazyInternalConnection.Initialize() +129</span><br><span class="line">   System.Data.Entity.Internal.LazyInternalConnection.CreateObjectContextFromConnectionModel() +13</span><br><span class="line">   System.Data.Entity.Internal.LazyInternalContext.InitializeContext() +274</span><br><span class="line">   System.Data.Entity.Internal.InternalContext.ExecuteSqlQuery(String sql, Object[] parameters) +26</span><br><span class="line">   System.Data.Entity.Internal.InternalContext.ExecuteSqlQueryAsIEnumerable(String sql, Object[] parameters) +63</span><br><span class="line">   System.Data.Entity.Internal.InternalContext.ExecuteSqlQuery(Type elementType, String sql, Object[] parameters) +175</span><br><span class="line">   System.Data.Entity.Internal.InternalSqlNonSetQuery.GetEnumerator() +26</span><br><span class="line">   System.Data.Entity.Internal.InternalSqlQuery&#96;1.GetEnumerator() +17</span><br><span class="line">   System.Collections.Generic.List&#96;1..ctor(IEnumerable&#96;1 collection) +174</span><br><span class="line">   System.Linq.Enumerable.ToList(IEnumerable&#96;1 source) +61</span><br><span class="line">   Portal.DataAccess.Bom.DASOBom.GetCPSOBomMainList(List&#96;1 soBomList, Int32&amp; pageid, Int32 pagesize) in D:\Portal-VS2013-NC\Portal-VS2013-NC\DataAccess\Bom\DASOBom.cs:3218</span><br><span class="line">   Portal.BLL.Bom.SOBom.GetCPSOBomMainObjectList(List&#96;1 soBomList, Int32&amp; pageid, Int32 pagesize) in D:\Portal-VS2013-NC\Portal-VS2013-NC\BLL\Bom\SOBom.cs:2611</span><br><span class="line">   Portal.Web.bom.SOBomMain_CP.InitData(String strSearchText) in D:\Portal-VS2013-NC\Portal-VS2013-NC\web\bom\SOBomMain_CP.aspx.cs:108</span><br><span class="line">   Portal.Web.bom.SOBomMain_CP.BtnSearchClick(Object sender, EventArgs e) in D:\Portal-VS2013-NC\Portal-VS2013-NC\web\bom\SOBomMain_CP.aspx.cs:151</span><br><span class="line">   Portal.Web.bom.SOBomMain_CP.Page_Load(Object sender, EventArgs e) in D:\Portal-VS2013-NC\Portal-VS2013-NC\web\bom\SOBomMain_CP.aspx.cs:49</span><br><span class="line">   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +52</span><br><span class="line">   System.Web.UI.Control.OnLoad(EventArgs e) +97</span><br><span class="line">   System.Web.UI.Control.LoadRecursive() +61</span><br><span class="line">   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693</span><br></pre></td></tr></table></figure></div>

<p><strong>版本信息:</strong> Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.8.4494.0</p>
<hr>
<h2 id="2-问题原因"><a href="#2-问题原因" class="headerlink" title="2. 问题原因"></a>2. 问题原因</h2><p>出现此错误的原因是：<strong>Oracle数据库的ODP.NET驱动没有安装</strong>。</p>
<p>ps:</p>
<blockquote>
<p><strong>首先考虑 ODP.NET 是否安装成功</strong>的，其次，考虑x86&#x2F;x64的原因，您的项目的build target(x86&#x2F;x64)设定要与本机安装的ODP.NET的驱动版本(x86&#x2F;x64)要一致。</p>
</blockquote>
<hr>
<h2 id="3-查看与设置ORACLE-HOME环境变量"><a href="#3-查看与设置ORACLE-HOME环境变量" class="headerlink" title="3. 查看与设置ORACLE_HOME环境变量"></a>3. 查看与设置ORACLE_HOME环境变量</h2><p>查看设置的环境变量是否正确: <code>echo %ORACLE_HOME%</code></p>
<div class="highlight-box"autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="false"data-rel="CMD"><figure class="iseeu highlight /cmd"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="function">D:\<span class="title">Downloads</span>\压缩文件\<span class="title">ODP.NET_Managed_ODAC122cR1_3</span>&gt;<span class="title">echo</span> %<span class="title">ORACLE_HOME</span>%</span></span><br><span class="line"><span class="function"><span class="title">D</span>:\<span class="title">app</span>\<span class="title">R00004050</span>\<span class="title">product</span>\11.2.0\<span class="title">client_1</span></span></span><br></pre></td></tr></table></figure></div>

<p>若没有定义，去系统环境变量中添加，<code>D:\app\R00004050\product\11.2.0\client_1</code></p>
<p><img src="/2022/08/29/NET-Framework-%E8%BF%9E%E6%8E%A5-Oracle%E6%95%B0%E6%8D%AE%E5%BA%93/2022-08-30-10-58-26.png" alt="添加环境变量"></p>
<h3 id="3-1-Windows下查看与设置环境变量"><a href="#3-1-Windows下查看与设置环境变量" class="headerlink" title="3.1. Windows下查看与设置环境变量"></a>3.1. Windows下查看与设置环境变量</h3><p>使用命令或在系统环境变量中设置 <code>ORACLE_HOME</code> 环境变量。</p>
<p>命令设置方式参考：</p>
<p><a href="https://blog.csdn.net/csdjia11/article/details/107773757" target="_blank" rel="noopener">Windows10通过cmd命令行添加环境变量_code_god_1024的博客-CSDN博客_命令行添加环境变量</a></p>
<hr>
<h2 id="4-下载与安装ODP-NET驱动"><a href="#4-下载与安装ODP-NET驱动" class="headerlink" title="4. 下载与安装ODP.NET驱动"></a>4. 下载与安装ODP.NET驱动</h2><p>.Net应用程序与ODP.Net处理器类型保持一致。</p>
<p>查看<code>web.config</code>文件</p>
<div class="highlight-box"autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="false"data-rel="XML"><figure class="iseeu highlight /xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">TargetFrameworkVersion</span>&gt;</span>v4.0<span class="tag">&lt;/<span class="name">TargetFrameworkVersion</span>&gt;</span></span><br><span class="line">...</span><br><span class="line"><span class="tag">&lt;<span class="name">PlatformTarget</span>&gt;</span>x86<span class="tag">&lt;/<span class="name">PlatformTarget</span>&gt;</span></span><br></pre></td></tr></table></figure></div>

<p>我是32位x86版本，.Net Framework 4.0, 所以下载<code>32位版ODP.NET</code>。</p>
<p>下载地址(总揽):<br><a href="http://www.oracle.com/technetwork/topics/dotnet/downloads/index.html" target="_blank" rel="noopener">http://www.oracle.com/technetwork/topics/dotnet/downloads/index.html</a></p>
<p>64位ODP.Net下载地址:<br><a href="http://www.oracle.com/technetwork/database/windows/downloads/index-090165.html" target="_blank" rel="noopener">http://www.oracle.com/technetwork/database/windows/downloads/index-090165.html</a></p>
<p><strong>32位ODP.Net下载地址</strong>:<br><a href="http://www.oracle.com/technetwork/database/windows/downloads/utilsoft-087491.html" target="_blank" rel="noopener">http://www.oracle.com/technetwork/database/windows/downloads/utilsoft-087491.html</a></p>
<p>注意下载的时候,跟你的数据库版本保持一致.</p>
<p>下载解压后，打开文件 <code>readme.htm</code> 查看安装方法（管理员模式CMD命令安装）。</p>
<p>CMD（管理员模式打开），<code>cd</code> 进入<code>ODP.NET</code>解压目录（如果解压目录在D盘，需要先输入<code>D:\</code>进入D盘，再输入<code>cd D:\你的解压目录\</code>）：</p>
<div class="highlight-box"autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="false"data-rel="CMD"><figure class="iseeu highlight /cmd"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="function">D:\</span></span><br><span class="line"><span class="function"><span class="title">cd</span> 你的解压目录</span></span><br><span class="line"><span class="function"><span class="title">install_odpm.bat</span> %<span class="title">ORACLE_HOME</span>% <span class="title">both</span> <span class="title">true</span></span></span><br></pre></td></tr></table></figure></div>

<p>使用命令安装完成后，查看是否生成节点信息:在对应的.NetFramework版本下查看 <code>machine.config</code>里面的<code>&lt;system.data&gt;&lt;DbProviderFactories&gt;</code>节点。</p>
<p>我的文件在：<code>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config</code>，如下图：</p>
<p><a href="https://imgse.com/i/vhE8HI" target="_blank" rel="noopener"><img src="https://s1.ax1x.com/2022/08/30/vhE8HI.png" alt="vhE8HI.png"></a></p>
<p>生成的节点信息：</p>
<div class="highlight-box"autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="false"data-rel="XML"><figure class="iseeu highlight /xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">system.data</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">DbProviderFactories</span>&gt;</span></span><br><span class="line">      <span class="tag">&lt;<span class="name">add</span> <span class="attr">name</span>=<span class="string">"ODP.NET, Managed Driver"</span> <span class="attr">invariant</span>=<span class="string">"Oracle.ManagedDataAccess.Client"</span> <span class="attr">description</span>=<span class="string">"Oracle Data Provider for .NET, Managed Driver"</span> <span class="attr">type</span>=<span class="string">"Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.122.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342"</span> /&gt;</span></span><br><span class="line">      </span><br><span class="line">      <span class="tag">&lt;<span class="name">add</span> <span class="attr">name</span>=<span class="string">"Microsoft SQL Server Compact Data Provider 4.0"</span> <span class="attr">invariant</span>=<span class="string">"System.Data.SqlServerCe.4.0"</span> <span class="attr">description</span>=<span class="string">".NET Framework Data Provider for Microsoft SQL Server Compact"</span> <span class="attr">type</span>=<span class="string">"System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"</span> /&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">DbProviderFactories</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;/<span class="name">system.data</span>&gt;</span></span><br></pre></td></tr></table></figure></div>

<hr>
<p>至此，<strong>驱动应该安装完成了</strong>。这个错误也解决了。下面的错误和ODP.NET驱动实际上没关系。</p>
<hr>
<h2 id="5-Oracle数据库连接配置"><a href="#5-Oracle数据库连接配置" class="headerlink" title="5. Oracle数据库连接配置"></a>5. Oracle数据库连接配置</h2><p>安装ODP.NET后重启应用</p>
<p><img src="/2022/08/29/NET-Framework-%E8%BF%9E%E6%8E%A5-Oracle%E6%95%B0%E6%8D%AE%E5%BA%93/2022-08-30-08-52-27.png" alt="“/”应用程序中的服务器错误"></p>
<p>“&#x2F;”应用程序中的服务器错误</p>
<hr>
<p>ORA-01017: <em>invalid username&#x2F;password; logon denied</em></p>
<p><strong>说明:</strong> 执行当前 Web 请求期间，出现未经处理的异常。请检查堆栈跟踪信息，以了解有关该错误以及代码中导致错误的出处的详细信息。</p>
<p><strong>异常详细信息:</strong> Oracle.ManagedDataAccess.Client.OracleException: ORA-01017: invalid username&#x2F;password; logon denied</p>
<p><strong>源错误:</strong></p>
<div class="highlight-box"autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="false"data-rel="PLAIN"><figure class="iseeu highlight /plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line">行 3216:</span><br><span class="line">行 3217:            var arr &#x3D; list.Select(s &#x3D;&gt; s.SoMainId).ToArray();</span><br><span class="line">行 3218:            var query &#x3D; _ncdataEntities.Database.SqlQuery&lt;SOMainCustomerInfo&gt;(string.Format( 行 3219:                            @&quot;select a.csaleorderid AS SOMainId</span><br><span class="line">行 3220:                                    ,a.vbillcode AS SOCode</span><br></pre></td></tr></table></figure></div>

<p><strong>源文件:</strong> D:\Portal-VS2013-NC\Portal-VS2013-NC\DataAccess\Bom\DASOBom.cs <strong>行:</strong> 3218</p>
<p><strong>堆栈跟踪:</strong></p>
<div class="highlight-box"autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="false"data-rel="PLAIN"><figure class="iseeu highlight /plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br></pre></td><td class="code"><pre><span class="line">[OracleException (0x80004005): ORA-01017: invalid username&#x2F;password; logon denied]</span><br><span class="line">   OracleInternal.ConnectionPool.PoolManager&#96;3.Get(ConnectionString csWithDiffOrNewPwd, Boolean bGetForApp, CriteriaCtx criteriaCtx, String affinityInstanceName, Boolean bForceMatch) +10977</span><br><span class="line">   OracleInternal.ConnectionPool.OraclePoolManager.Get(ConnectionString csWithNewPassword, Boolean bGetForApp, CriteriaCtx criteriaCtx, String affinityInstanceName, Boolean bForceMatch) +964</span><br><span class="line">   OracleInternal.ConnectionPool.OracleConnectionDispenser&#96;3.Get(ConnectionString cs, PM conPM, ConnectionString pmCS, SecureString securedPassword, SecureString securedProxyPassword, CriteriaCtx criteriaCtx) +1065</span><br><span class="line">   Oracle.ManagedDataAccess.Client.OracleConnection.Open() +3399</span><br><span class="line">   System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean&amp; closeStoreConnectionOnFailure) +41</span><br><span class="line"></span><br><span class="line">[EntityException: 基础提供程序在 Open 上失败。]</span><br><span class="line">   System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean&amp; closeStoreConnectionOnFailure) +220</span><br><span class="line">   System.Data.EntityClient.EntityConnection.Open() +105</span><br><span class="line">   System.Data.Objects.ObjectContext.EnsureConnection() +77</span><br><span class="line">   System.Data.Objects.ObjectContext.ExecuteStoreQueryInternal(String commandText, String entitySetName, MergeOption mergeOption, Object[] parameters) +95</span><br><span class="line">   System.Data.Objects.ObjectContext.ExecuteStoreQuery(String commandText, Object[] parameters) +61</span><br><span class="line">   System.Data.Entity.Internal.InternalContext.ExecuteSqlQuery(String sql, Object[] parameters) +93</span><br><span class="line">   System.Data.Entity.Internal.InternalContext.ExecuteSqlQueryAsIEnumerable(String sql, Object[] parameters) +63</span><br><span class="line">   System.Data.Entity.Internal.InternalContext.ExecuteSqlQuery(Type elementType, String sql, Object[] parameters) +175</span><br><span class="line">   System.Data.Entity.Internal.InternalSqlNonSetQuery.GetEnumerator() +26</span><br><span class="line">   System.Data.Entity.Internal.InternalSqlQuery&#96;1.GetEnumerator() +17</span><br><span class="line">   System.Collections.Generic.List&#96;1..ctor(IEnumerable&#96;1 collection) +174</span><br><span class="line">   System.Linq.Enumerable.ToList(IEnumerable&#96;1 source) +61</span><br><span class="line">   Portal.DataAccess.Bom.DASOBom.GetCPSOBomMainList(List&#96;1 soBomList, Int32&amp; pageid, Int32 pagesize) in D:\Portal-VS2013-NC\Portal-VS2013-NC\DataAccess\Bom\DASOBom.cs:3218</span><br><span class="line">   Portal.BLL.Bom.SOBom.GetCPSOBomMainObjectList(List&#96;1 soBomList, Int32&amp; pageid, Int32 pagesize) in D:\Portal-VS2013-NC\Portal-VS2013-NC\BLL\Bom\SOBom.cs:2611</span><br><span class="line">   Portal.Web.bom.SOBomMain_CP.InitData(String strSearchText) in D:\Portal-VS2013-NC\Portal-VS2013-NC\web\bom\SOBomMain_CP.aspx.cs:108</span><br><span class="line">   Portal.Web.bom.SOBomMain_CP.BtnSearchClick(Object sender, EventArgs e) in D:\Portal-VS2013-NC\Portal-VS2013-NC\web\bom\SOBomMain_CP.aspx.cs:151</span><br><span class="line">   Portal.Web.bom.SOBomMain_CP.Page_Load(Object sender, EventArgs e) in D:\Portal-VS2013-NC\Portal-VS2013-NC\web\bom\SOBomMain_CP.aspx.cs:49</span><br><span class="line">   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +52</span><br><span class="line">   System.Web.UI.Control.OnLoad(EventArgs e) +97</span><br><span class="line">   System.Web.UI.Control.LoadRecursive() +61</span><br><span class="line">   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693</span><br></pre></td></tr></table></figure></div>

<h3 id="5-1-分析与解决错误"><a href="#5-1-分析与解决错误" class="headerlink" title="5.1. 分析与解决错误"></a>5.1. 分析与解决错误</h3><p>出现此错误，说明前面安装Oracle连接驱动正常，但是连接配置有问题，所以报用户名密码无效。</p>
<p>查看源码中<code>_ncdataEntities</code>对象在初始化时所使用的连接字符串<code>NCDATAEntities</code>在<code>app.config</code>中的配置内容：</p>
<div class="highlight-box"autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="false"data-rel="XML"><figure class="iseeu highlight /xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">add</span> <span class="attr">name</span>=<span class="string">"NCDATAEntities"</span> <span class="attr">connectionString</span>=<span class="string">"metadata=res://*/NCDATAModel.csdl|res://*/NCDATAModel.ssdl|res://*/NCDATAModel.msl;provider=Oracle.ManagedDataAccess.Client;provider connection string=<span class="symbol">&amp;quot;</span>data source=ORCL;password=******;user id=NCDB<span class="symbol">&amp;quot;</span>"</span> </span></span><br><span class="line"><span class="tag"><span class="attr">providerName</span>=<span class="string">"System.Data.EntityClient"</span> /&gt;</span></span><br></pre></td></tr></table></figure></div>

<p>这是一种连接字符串的写法，Oracle 对 微软 实体框架 EF6 的支持，在 ODP.NET 的新版本中才有实现。</p>
<p>关注这里的 <code>data source</code>, <code>password</code>, <code>user id</code> 几个关键属性。我们的报错信息 <code>Oracle.ManagedDataAccess.Client.OracleException: ORA-01017: invalid username/password; logon denied</code> 主要和这几个参数配置有关。</p>
<h4 id="5-1-1-先了解下-oracle-tnsnames-ora-文件用法"><a href="#5-1-1-先了解下-oracle-tnsnames-ora-文件用法" class="headerlink" title="5.1.1. 先了解下 oracle tnsnames.ora 文件用法"></a>5.1.1. 先了解下 oracle <code>tnsnames.ora</code> 文件用法</h4><h5 id="5-1-1-1-1-用途"><a href="#5-1-1-1-1-用途" class="headerlink" title="5.1.1.1. 1.用途"></a>5.1.1.1. 1.用途</h5><p>Oracle客户端所需要的一个文件，通过该文件可以配置数据库的连接地址，配好后，Oracle地址了，直接用简易的字符串代替。</p>
<p>如：本该是数据库地址为：<code>127.0.0.1:1521/orcl</code>,通过设置<code>tnsnames.ora</code>,为它起的别名为：<code>dataBaseAddr</code>,就可以用 <code>dataBaseAddr</code> 代替了。</p>
<h5 id="5-1-1-2-2-用法"><a href="#5-1-1-2-2-用法" class="headerlink" title="5.1.1.2. 2.用法"></a>5.1.1.2. 2.用法</h5><p>用以管理员方式运行文本编辑器，打开Oracle客户端目录的<code>D:\app\R00004050\product\11.2.0\client_1\network\admin\tnsnames.ora</code>文件，内容如下：</p>
<p><a href="https://imgse.com/i/vhEt4f" target="_blank" rel="noopener"><img src="https://s1.ax1x.com/2022/08/30/vhEt4f.png" alt="vhEt4f.png"></a></p>
<div class="highlight-box"autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="false"data-rel="PLAIN"><figure class="iseeu highlight /plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">ORCL &#x3D;</span><br><span class="line">   (DESCRIPTION &#x3D;</span><br><span class="line">    (ADDRESS &#x3D; (PROTOCOL &#x3D; TCP)(HOST &#x3D; 192.168.80.50)(PORT &#x3D; 1521))</span><br><span class="line">    (CONNECT_DATA &#x3D;</span><br><span class="line">      (SERVER &#x3D; DEDICATED)</span><br><span class="line">      (SERVICE_NAME &#x3D; ORCL) </span><br><span class="line">    )</span><br><span class="line">  )</span><br></pre></td></tr></table></figure></div>

<p>在我们的项目中的连接字符串所设置的<code>data source=ORCL</code> 属性，这里的<code>ORCL</code>就是<code>tnsnames.ora</code>文件中所配置的别名 <code>ORCL = (...)</code>。</p>
<h3 id="5-2-解决方法"><a href="#5-2-解决方法" class="headerlink" title="5.2. 解决方法"></a>5.2. 解决方法</h3><p>解决方法：检查项目 <code>app.config</code> 的 <code>user id</code>, <code>password</code> 以及这里<code>tnsnames.ora</code>文件的 <code>HOST</code>,<code>PORT</code> 是否正确。</p>
<p>本例中 HOST 地址配置错误，使用了测试环境 Oracle 的 IP 地址，所以将 <code>HOST</code> 改为生产环境 IP 地址后 Oracle 数据库连接正确。</p>
<hr>
<p>参考文章：</p>
<ol>
<li><a href="https://www.cnblogs.com/gudi/p/6110875.html" target="_blank" rel="noopener"><strong>错误:找不到请求的 .Net Framework Data Provider。可能没有安装.</strong></a></li>
<li><a href="https://blog.51cto.com/iteyer/3239259" target="_blank" rel="noopener">.net中使用ODP.net访问Oracle数据库（无客户端部署方法）_iteyer的技术博客_51CTO博客</a></li>
<li><a href="https://social.msdn.microsoft.com/Forums/vstudio/zh-CN/b408efcb-d03f-4ddb-b9a5-e1db2d5b793d/252141998121040358312771430340-net-framework-data?forum=wpfzhchs" target="_blank" rel="noopener">找不到请求的 .Net Framework Data Provider。可能没有安装。</a></li>
<li><a href="https://www.cnblogs.com/Marydon20170307/p/9453064.html" target="_blank" rel="noopener"><strong>oracle tnsnames.ora文件用法说明</strong></a></li>
<li><a href="https://www.oracle.com/ocom/groups/public/@otn/documents/webcontent/229640_zhs.htm" target="_blank" rel="noopener">Oracle Data Provider for .NET（C# 版）入门</a></li>
<li><a href="https://blog.csdn.net/WuLex/article/details/87303446" target="_blank" rel="noopener">ODP.NET_风神修罗使的博客-CSDN博客</a></li>
<li><a href="https://docs.oracle.com/cd/E63277_01/win.121/e63268/installODPmd.htm#ODPNT8149" target="_blank" rel="noopener">Installing Oracle Data Provider for .NET, Managed Driver</a></li>
<li><a href="https://blog.csdn.net/csdjia11/article/details/107773757" target="_blank" rel="noopener">Windows10通过cmd命令行添加环境变量_code_god_1024的博客-CSDN博客_命令行添加环境变量</a></li>
</ol>

          
      
    </div>
    
    
      <footer class="article-footer">
        完
      </footer>
    
  </div>
  
    
<nav id="article-nav">
  <div class="article-nav-block">
    
      <a href="../../31/JavaScript%E8%8E%B7%E5%8F%96%E7%BD%91%E9%A1%B5URL%E5%9C%B0%E5%9D%80%E7%9A%84%E6%9F%A5%E8%AF%A2%E5%8F%82%E6%95%B0-QueryString-%E7%9A%84%E6%96%B9%E6%B3%95/" id="article-nav-newer" class="article-nav-link-wrap">
        <strong class="article-nav-caption"></strong>
        <div class="article-nav-title">
          
            JavaScript获取网页URL地址的查询参数(QueryString)的方法
          
        </div>
      </a>
    
  </div>
  <div class="article-nav-block">
    
      <a href="../../27/%E7%94%B5%E8%84%91BIOS%E7%83%AD%E9%94%AEU%E7%9B%98%E5%90%AF%E5%8A%A8%E5%BF%AB%E6%8D%B7%E9%94%AE%E8%A1%A8/" id="article-nav-older" class="article-nav-link-wrap">
        <div class="article-nav-title">电脑BIOS热键U盘启动快捷键表</div>
        <strong class="article-nav-caption"></strong>
      </a>
    
  </div>
</nav>

    <!-- <link rel="stylesheet" href="/css/gitment.css">  -->
<script src='//unpkg.com/valine/dist/Valine.min.js'></script>

<div id="vcommentsContainer"></div>
<!--引用评论框输入特效js文件-->

<script src="../../../../js/shuru.js"></script>

<script>
  POWERMODE.colorful = true; // make power mode colorful
  POWERMODE.shake = true; // turn off shake
  document.body.addEventListener('input', POWERMODE);
</script>
<!-- valine评论系统 -->
<script>
  new Valine({
      el: '#vcommentsContainer',
      appId: 'AttjBiS7UwxkxjV1CSrNywoi-gzGzoHsz',
      appKey: 'F50aWycFFmAPLC8CfSW7rXdP',
      avatar: 'monsterid',
      enableQQ: true,
      placeholder: '昵称处填QQ号自动抓取网名和邮箱哟~'
  })
</script>


    <!-- <link rel="stylesheet" href="/css/gitment.css"> 
<script src="/js/gitment.js"></script>

<div id="gitmentContainer"></div>

<script>
var gitment = new Gitment({
  owner: '',
  repo: '',
  oauth: {
    client_id: '',
    client_secret: '',
  },
})
gitment.render('gitmentContainer')
</script>

 -->

  
  
</article>
</section>
        <aside id="sidebar">
  
    <div class="widget-box">
  <div class="avatar-box">
    <img class="avatar" src="https://q1.qlogo.cn/g?b=qq&amp;nk=979727728&amp;s=640" title="图片来自QQ"></img>
    <h3 class="avatar-name">
      
        许嵩老公
      
    </h3>
    <p class="avatar-slogan">
      深吸一口梦，吹个气球存起来。
    </p>
  </div>
</div>


  
    

  
    
  <div class="widget-box">
    <h3 class="widget-title">Tags</h3>
    <div class="widget">
      <ul class="tag-list" itemprop="keywords"><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/NET/" rel="tag">.NET</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/Cookie/" rel="tag">Cookie</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/ES6/" rel="tag">ES6</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/Git-Bash/" rel="tag">Git Bash</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/Github/" rel="tag">Github</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/Github-Actions/" rel="tag">Github Actions</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/HDFS/" rel="tag">HDFS</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/HTTP/" rel="tag">HTTP</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/Hadoop/" rel="tag">Hadoop</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/Hexo/" rel="tag">Hexo</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/Idea/" rel="tag">Idea</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/JVM/" rel="tag">JVM</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/Java/" rel="tag">Java</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/JavaScript/" rel="tag">JavaScript</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/Linux/" rel="tag">Linux</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/MapReduce/" rel="tag">MapReduce</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/Markdown/" rel="tag">Markdown</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/Maven/" rel="tag">Maven</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/Node/" rel="tag">Node</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/Node-js/" rel="tag">Node.js</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/SQL/" rel="tag">SQL</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/Serial-Port/" rel="tag">Serial Port</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/Shell/" rel="tag">Shell</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/SpringBoot/" rel="tag">SpringBoot</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/TCP/" rel="tag">TCP</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/VSCode/" rel="tag">VSCode</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/Vue/" rel="tag">Vue</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/WebSocket/" rel="tag">WebSocket</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/YARN/" rel="tag">YARN</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/hexo/" rel="tag">hexo</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/macOS/" rel="tag">macOS</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/ssh/" rel="tag">ssh</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/%E4%B8%AD%E6%96%87%E4%B9%B1%E7%A0%81/" rel="tag">中文乱码</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/%E5%A4%A7%E6%95%B0%E6%8D%AE/" rel="tag">大数据</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/%E5%AE%89%E8%A3%85%E6%95%99%E7%A8%8B/" rel="tag">安装教程</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/%E5%AF%86%E9%92%A5/" rel="tag">密钥</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/%E5%B9%B6%E8%A1%8C%E7%BC%96%E7%A8%8B/" rel="tag">并行编程</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/%E6%95%B0%E6%8D%AE%E5%BA%93/" rel="tag">数据库</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/%E7%94%B5%E8%84%91/" rel="tag">电脑</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/%E7%AB%B9%E4%BA%91/" rel="tag">竹云</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/%E7%BB%88%E7%AB%AF/" rel="tag">终端</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/%E8%84%9A%E6%9C%AC/" rel="tag">脚本</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/%E8%BD%AC%E8%BD%BD/" rel="tag">转载</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/%E8%BD%AF%E4%BB%B6/" rel="tag">软件</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-box">
    <h3 class="widget-title">Tag Cloud</h3>
    <div class="widget tagcloud">
      <a href="../../../../tags/NET/" style="font-size: 10px;">.NET</a> <a href="../../../../tags/Cookie/" style="font-size: 10px;">Cookie</a> <a href="../../../../tags/ES6/" style="font-size: 10px;">ES6</a> <a href="../../../../tags/Git-Bash/" style="font-size: 11.67px;">Git Bash</a> <a href="../../../../tags/Github/" style="font-size: 13.33px;">Github</a> <a href="../../../../tags/Github-Actions/" style="font-size: 10px;">Github Actions</a> <a href="../../../../tags/HDFS/" style="font-size: 10px;">HDFS</a> <a href="../../../../tags/HTTP/" style="font-size: 11.67px;">HTTP</a> <a href="../../../../tags/Hadoop/" style="font-size: 18.33px;">Hadoop</a> <a href="../../../../tags/Hexo/" style="font-size: 10px;">Hexo</a> <a href="../../../../tags/Idea/" style="font-size: 10px;">Idea</a> <a href="../../../../tags/JVM/" style="font-size: 18.33px;">JVM</a> <a href="../../../../tags/Java/" style="font-size: 20px;">Java</a> <a href="../../../../tags/JavaScript/" style="font-size: 16.67px;">JavaScript</a> <a href="../../../../tags/Linux/" style="font-size: 15px;">Linux</a> <a href="../../../../tags/MapReduce/" style="font-size: 11.67px;">MapReduce</a> <a href="../../../../tags/Markdown/" style="font-size: 10px;">Markdown</a> <a href="../../../../tags/Maven/" style="font-size: 13.33px;">Maven</a> <a href="../../../../tags/Node/" style="font-size: 10px;">Node</a> <a href="../../../../tags/Node-js/" style="font-size: 10px;">Node.js</a> <a href="../../../../tags/SQL/" style="font-size: 13.33px;">SQL</a> <a href="../../../../tags/Serial-Port/" style="font-size: 10px;">Serial Port</a> <a href="../../../../tags/Shell/" style="font-size: 11.67px;">Shell</a> <a href="../../../../tags/SpringBoot/" style="font-size: 10px;">SpringBoot</a> <a href="../../../../tags/TCP/" style="font-size: 10px;">TCP</a> <a href="../../../../tags/VSCode/" style="font-size: 10px;">VSCode</a> <a href="../../../../tags/Vue/" style="font-size: 10px;">Vue</a> <a href="../../../../tags/WebSocket/" style="font-size: 11.67px;">WebSocket</a> <a href="../../../../tags/YARN/" style="font-size: 10px;">YARN</a> <a href="../../../../tags/hexo/" style="font-size: 11.67px;">hexo</a> <a href="../../../../tags/macOS/" style="font-size: 11.67px;">macOS</a> <a href="../../../../tags/ssh/" style="font-size: 11.67px;">ssh</a> <a href="../../../../tags/%E4%B8%AD%E6%96%87%E4%B9%B1%E7%A0%81/" style="font-size: 10px;">中文乱码</a> <a href="../../../../tags/%E5%A4%A7%E6%95%B0%E6%8D%AE/" style="font-size: 10px;">大数据</a> <a href="../../../../tags/%E5%AE%89%E8%A3%85%E6%95%99%E7%A8%8B/" style="font-size: 10px;">安装教程</a> <a href="../../../../tags/%E5%AF%86%E9%92%A5/" style="font-size: 10px;">密钥</a> <a href="../../../../tags/%E5%B9%B6%E8%A1%8C%E7%BC%96%E7%A8%8B/" style="font-size: 10px;">并行编程</a> <a href="../../../../tags/%E6%95%B0%E6%8D%AE%E5%BA%93/" style="font-size: 10px;">数据库</a> <a href="../../../../tags/%E7%94%B5%E8%84%91/" style="font-size: 11.67px;">电脑</a> <a href="../../../../tags/%E7%AB%B9%E4%BA%91/" style="font-size: 11.67px;">竹云</a> <a href="../../../../tags/%E7%BB%88%E7%AB%AF/" style="font-size: 13.33px;">终端</a> <a href="../../../../tags/%E8%84%9A%E6%9C%AC/" style="font-size: 10px;">脚本</a> <a href="../../../../tags/%E8%BD%AC%E8%BD%BD/" style="font-size: 10px;">转载</a> <a href="../../../../tags/%E8%BD%AF%E4%BB%B6/" style="font-size: 10px;">软件</a>
    </div>
  </div>

  
    
  <div class="widget-box">
    <h3 class="widget-title">Archives</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="../../../../archives/2023/02/">二月 2023</a></li><li class="archive-list-item"><a class="archive-list-link" href="../../../../archives/2023/01/">一月 2023</a></li><li class="archive-list-item"><a class="archive-list-link" href="../../../../archives/2022/11/">十一月 2022</a></li><li class="archive-list-item"><a class="archive-list-link" href="../../../../archives/2022/09/">九月 2022</a></li><li class="archive-list-item"><a class="archive-list-link" href="../../../../archives/2022/08/">八月 2022</a></li><li class="archive-list-item"><a class="archive-list-link" href="../../../../archives/2021/12/">十二月 2021</a></li><li class="archive-list-item"><a class="archive-list-link" href="../../../../archives/2021/02/">二月 2021</a></li><li class="archive-list-item"><a class="archive-list-link" href="../../../../archives/2021/01/">一月 2021</a></li><li class="archive-list-item"><a class="archive-list-link" href="../../../../archives/2020/08/">八月 2020</a></li><li class="archive-list-item"><a class="archive-list-link" href="../../../../archives/2020/07/">七月 2020</a></li><li class="archive-list-item"><a class="archive-list-link" href="../../../../archives/2020/06/">六月 2020</a></li></ul>
    </div>
  </div>

  
    
  <div class="widget-box">
    <h3 class="widget-title">Recent Posts</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="../../../../2023/02/13/%E4%BD%BF%E7%94%A8Node-js%E5%90%8E%E5%8F%B0%E8%AF%BB%E5%8F%96%E4%B8%B2%E5%8F%A3%E6%95%B0%E6%8D%AE%E5%B9%B6%E9%80%9A%E8%BF%87WebSocket%E5%AE%9E%E6%97%B6%E6%98%BE%E7%A4%BA%E5%9C%A8%E7%BD%91%E9%A1%B5%E4%B8%8A/">使用Node.js后台读取串口数据并通过WebSocket实时显示在网页上</a>
          </li>
        
          <li>
            <a href="../../../../2023/02/09/%E4%BD%9C%E4%B8%BA%E7%94%A8%E6%88%B7%EF%BC%8C%E4%BF%AE%E6%94%B9Cookie%E6%9C%89%E6%95%88%E6%9C%9F%EF%BC%8C%E5%BB%B6%E9%95%BFCookie%E6%9C%9F%E9%99%90/">作为用户，修改Cookie有效期，延长Cookie期限</a>
          </li>
        
          <li>
            <a href="../../../../2023/02/08/%E7%BB%88%E7%AB%AF%E5%91%BD%E4%BB%A4%E4%BB%A3%E7%90%86/">终端命令网络设置</a>
          </li>
        
          <li>
            <a href="../../../../2023/01/18/Windows%E7%B3%BB%E7%BB%9FC%E7%9B%98%E6%B8%85%E7%90%86%E5%B7%A5%E5%85%B7FreeMove%E5%8F%8A%E6%96%87%E4%BB%B6%E5%8D%A0%E7%94%A8%E8%BF%9B%E7%A8%8B%E6%9F%A5%E7%9C%8B%E8%BD%AF%E4%BB%B6LockHunter%E9%85%8D%E5%90%88%E4%BD%BF%E7%94%A8/">Windows系统C盘清理工具FreeMove及文件占用进程查看软件LockHunter配合使用</a>
          </li>
        
          <li>
            <a href="../../../../2023/01/14/AutoReconnectWiFi/">检测断网自动重连WiFi脚本</a>
          </li>
        
      </ul>
    </div>
  </div>

  
      <div class="widget-box">
    <h3 class="widget-title">友链</h3>
    <div class="widget">
      
        <!-- <a style="display: block;" href="../../../../https:/xiaoyan94.github.io/" title target='_blank' -->
        <a style="display: block;" href="https://xiaoyan94.github.io/" title target='_blank'
        >Github Pages</a>
      
        <!-- <a style="display: block;" href="../../../../https:/xy94.gitee.io/" title target='_blank' -->
        <a style="display: block;" href="https://xy94.gitee.io/" title target='_blank'
        >Gitee Pages</a>
      
    </div>
  </div>

  
 
  
</aside>
      </div>
      <footer id="footer">
  <div class="foot-box global-width center">
    &copy; 2023 许嵩老公 &nbsp;&nbsp;
    Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
    &nbsp;|&nbsp;主题 <a href="https://github.com/yiluyanxia/hexo-theme-antiquity" target="_blank" rel="noopener">antiquity</a>
    <br>
    <script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
    <span id="busuanzi_container_site_pv">不蒜子告之   阁下是第<span id="busuanzi_value_site_pv"></span>个访客</span>
    
  </div>
  
  <!--引入文字点击特效-->
  <script src="https://code.jquery.com/jquery-2.0.3.min.js"></script>
  
<script src="../../../../js/dianji.js"></script>

</footer>

<!--添加回到顶部按钮-->
<style>
/* 小猫置顶 */
/* 自定义回到顶部样式 */
.cd-top {
  position: fixed;
  right: 25px;
  top: -900px;
  z-index: 99;
  width: 70px;
  height: 900px;
  /* background: url(https://cdn.jsdelivr.net/gh/moezx/cdn@3.1.9/img/Sakura/images/scroll.png) no-repeat center; */
  background: url(/images/scroll.png) no-repeat center;
  background-size: contain;
  -webkit-transition: all .5s ease-in-out;
  transition: all .5s ease-in-out;
  /* cursor: url(https://cdn.jsdelivr.net/gh/moezx/cdn@3.1.9/img/Sakura/cursor/No_Disponible.cur), auto; */
  cursor: url(/images/cursor/No_Disponible.cur), auto;
  opacity: 1
}

.cd-top.cd-is-visible {
  opacity: 1;
  top: -326px
}

.cd-top.cd-fade-out {
  opacity: 1
}

.cd-top:hover {
  opacity: 1
}

.cd-top span {
  display: none;
  color: #000;
  position: absolute;
  bottom: 0;
  height: 20px;
  width: 50px;
  text-align: center
}

@media screen and (max-width:860px) {
  .cd-top {
      display: none;
      height: 60px;
      width: 50px
  }
  .cd-top span {
      height: 10px;
      width: 50px
  }
}

#moblieGoTop {
  display: none;
  position: fixed;
  bottom: 10px;
  right: 10px;
  z-index: 99;
  border: 0;
  outline: 0;
  background-color: #fff;
  color: #404040;
  cursor: pointer;
  padding: 15px;
  border-radius: 10px;
  border-radius: 12px;
  box-shadow: 0 0 2px 0 rgba(0, 0, 0, .12), 0 2px 2px 0 rgba(0, 0, 0, .24);
  transition: box-shadow .2s ease
}
#moblieGoTop:hover {
  background-color: #fff;
  opacity: .8
}
.changeSkin-gear {
  position: fixed;
  bottom: 0;
  left: auto;
  right: 5px;
  width: auto;
  height: auto;
  z-index: 99;
  white-space: nowrap;
  padding: 10px 10px;
  cursor: pointer;
  border-radius: 10px 10px 0 0
}
</style>

<!-- 添加小猫置顶 -->
<a class="cd-top faa-float animated cd-is-visible cd-fade-out" style="top: -500px;"></a>
<button id="moblieGoTop" title="Go to top" style="display: none;font-size: xx-large;"><i class="fa fa-chevron-up" aria-hidden="true"></i>🔝</button>

<!-- <div class="scroll "> <i class="fa fa-arrow-up" style="margin-left: 4px;"></i>
Top⬆️
<span class="scrollpercent" style="margin-left: -2px;"></span>
<span style="margin-right: 4px; margin-left: -4px;">%</span>
</div> -->

<!-- https://www.huangpinke.com/2018/08/24/add-back-to-top-button.html -->
      <script src="https://code.jquery.com/jquery-2.0.3.min.js"></script>
<script>
if (!window.jQuery) {
var script = document.createElement('script');
script.src = "/js/jquery-2.0.3.min.js";
document.body.write(script);
}
</script>

  
<link rel="stylesheet" href="../../../../fancybox/jquery.fancybox.css">

  
<script src="../../../../fancybox/jquery.fancybox.pack.js"></script>




<script src="../../../../js/script.js"></script>




<script>
  (function(){
      var bp = document.createElement('script');
      bp.src = '//push.zhanzhang.baidu.com/push.js';
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(bp, s);
  })();
  </script>

<!-- mermaid图 -->

  <script src='https://unpkg.com/mermaid@7.1.2/dist/mermaid.min.js'></script>
  <script>
    if (window.mermaid) {
      mermaid.initialize({theme: 'forest'});
    }
  </script>

    </div>
    <nav id="mobile-nav" class="mobile-nav-box">
  <div class="mobile-nav-img mobile-nav-top"></div>
  
    <a href="../../../../index.html" class="mobile-nav-link">首页</a>
  
    <a href="../../../../archives" class="mobile-nav-link">归档</a>
  
    <a href="../../../../quick-notes" class="mobile-nav-link">小抄</a>
  
    <a href="../../../../about" class="mobile-nav-link">关于</a>
  
  <div class="mobile-nav-img  mobile-nav-bottom"></div>
</nav>    
  </div>
</body>

</html>